<!--
  Copyright (c) 2021 Huawei Device Co., Ltd.
  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.
  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8" http-equiv="X-UA-Compatible" content="IE=edge chrome=1">
    <title>OHOSReport</title>
    <!-- import CSS -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <script src="https://cdn.staticfile.org/echarts/4.3.0/echarts.min.js"></script>
    <!-- import Vue before Element -->
    <script src="https://cdn.jsdelivr.net/npm/vue@2.5.16/dist/vue.js"></script>
    <!-- import JavaScript -->
    <script src="https://unpkg.com/element-ui/lib/index.js"></script>
</head>
<body>

<div id="report_title" v-bind:class="{ title_s : true}">
    <template>
        <div>
            <h4>{{ title }}</h4>
        </div>
    </template>
</div>

<div id="report_summary" v-bind:class="{ subsystem_table_style : true}">
    <template>
        <el-table
            :data="summary_data"
            border
            size="mini"
            :default-sort = "{prop: 'id'}"
            row-key="id"
            style="width: 100%">
            <el-table-column
                prop="id"
                label="ID"
                width="100"
                show-overflow-tooltip>
            </el-table-column>
            <el-table-column
                prop="item"
                label="Item Name"
                show-overflow-tooltip>
            </el-table-column>
            <el-table-column
                prop="content"
                label="Value"
                show-overflow-tooltip>
            </el-table-column>
        </el-table>
    </template>
</div>

<div id="measure_title" v-bind:class="{ title_s : true}">
    <template>
        <div>
            <h4>{{ title }}</h4>
        </div>
    </template>
</div>

<div id="main" class="box" style="width: 1300px; height:600px;"></div>

</body>

<!-- report_title -->
<script>
    new Vue({
        el: '#report_title',
        data: { title : 'Microbenchmark Details'}
    })
</script>

<script>
    new Vue({
        el: '#measure_title',
        data: { title : ''}
    })
</script>

<script>
    new Vue({
        el: '#report_summary',
        data: {
            summary_data: OHOS_REPORT_SUMMARY,
        },
        methods: {
            handleChange: function (val)
            {
                console.log(val);
            },
        }
    })
</script>

<style>
    .title_s {
        max-width: 1300px;
        margin: auto;
        background: white;
        height: 25px;
        color: #003399;
        padding: 10px 8px;
        text-align: center;
    }
    .error_s {
        color: #f00000;
        font-size: 14px;
    }
    .subsystem_table_style {
        max-width: 1300px;
        margin: auto;
        background: white;
        padding: 10px;
    }
    .el-table .warning-row {
        background: oldlace;
    }
    .el-table .failed-cell {
        color: #003399;
    }
    .el-table .success-row {
        background: #f0f9eb;
    }
    .el-table .header-row {
        color: #003399;
    }
   *{
        padding: 0;
        margin: 0;
    }
    .box {
        padding-top: 10px;
        max-width: 1300px;
        margin: auto;
        height: 600px;
    }
</style>
</html>
